﻿@using HuskyRescue.Web.Infrastructure.Extensions;
@model HuskyRescue.Core.ViewModel.EntityEmailAddress
<li>
	@using (Html.BeginCollectionItem("Base.EmailAddresses"))
 {
		
		@Html.HiddenFor(model => model.ID)
		@Html.HiddenFor(model => model.EntityID)

		@Html.LabelFor(model => model.Address)
		@Html.DropDownListFor(model => model.Type, Model.EmailTypeList)
		@Html.TextBoxFor(model => model.Address, new { @class = "email" })
		@Html.ValidationMessageFor(model => model.Address)
	 
	 if (Model.EntityID == null)
	 {
		<a href="#" onclick="EntityCRUD('@ViewData.TemplateInfo.HtmlFieldPrefix', 'email', 'create')">
			<img class="action" src="/Content/images/icons/save.png" /></a>
	 }
	 else
	 {
		<a href="#" onclick="EntityCRUD('@ViewData.TemplateInfo.HtmlFieldPrefix', 'email', 'update')">
			<img class="action" src="/Content/images/icons/save.png" /></a>
	 }
		<a href="#" onclick="EntityCRUD('@ViewData.TemplateInfo.HtmlFieldPrefix', 'email', 'delete')">
			<img class="action" src="/Content/images/icons/delete.png" /></a>
 }
	
</li>
